u = 'a'
p = 'b'
for i in range(3):
    username = input('Username:')
    password = input('Password:')
    if username == u and password == p:
        print('登录成功')
        break
    else:
        if i == 2:
            print('未输入正确的用户名和密码，程序已退出！')
            exit()
        else:
            print('请输入正确的用户名和密码！')
            continue

    # 来个错误次数提示？